<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="/tld/dictionary" prefix="dictionary"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<link rel="stylesheet" href="${ctx}/static/css/style.css" type="text/css" /> 
<link rel="stylesheet" href="${ctx}/static/css/style1.css" type="text/css" /> 
<link rel="stylesheet" href="${ctx}/static/css/kongjian.css" type="text/css" /> 

<link rel="stylesheet" href="${ctx}/static/css/jquery.ui.all.css">
	<script src="${ctx}/static/script/jquery-1.4.min.js"></script>
	<script>
	$(function() {
		if($("#id").val()>0){
  			$("#cardType").attr('disabled', 'disabled');
  			$("#language").attr('disabled', 'disabled');
  			$("#customerCode").attr('readOnly', true);
  			$("#cardId").attr('readOnly', true);
  			$("#cnName").attr('readOnly', true);
  			$("#enName").attr('readOnly', true);
  			$("#gender0").attr('readOnly', true);
  			$("#gender1").attr('readOnly', true);
  			$("#birtyday").attr('readOnly', true);
  			$("#nationality").attr('readOnly', true);
  			$("#motherName").attr('readOnly', true);
  			$("#signDate").attr('readOnly', true);
  			$("#invalidDate").attr('readOnly', true);
  		}
  		
		var customerManagerId=$('#customerManager').val();
		if(customerManagerId){
			$.get('${ctx}/account/user/getStaffName?staffId='+customerManagerId, function(data) {
			  $('#customerManagerDisplay').val(data);
			});
		}
		
		var consultantId=$('#consultant').val();
		if(consultantId){
			$.get('${ctx}/account/user/getStaffName?staffId='+consultantId, function(data) {
			  $('#consultantDisplay').val(data);
			}); 
		}
	});
	
	</script>
<title>客户管理</title>

</head>

<body>
<div class="er_banner">客户信息 </div>
<form:form id="inputForm" modelAttribute="customerInfoForm" action="${ctx}/crm/save" method="post">
	<input type="hidden" class="ggkj_inputtext_80" id="id" name="id" value="${customerInfoForm.id}"/>
   <div class="shenqing2">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr><th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;基本信息：</th></tr>
		<tr><th height="1" colspan="8" style="border-top:#999999 solid 1px;">&nbsp;</th></tr>
          <tr>
            <td width="85" class="tdright">*客户编号</td>
            <td width="150px" style="color:#2E74D1;" ><input type="text" class="ggkj_inputtext_180" disabled="disabled"  name="customerCode" value="${customerInfoForm.customerCode}"/><form:errors path="customerCode" cssClass="bind-error"/></td>
            <td width="85"  class="tdright">*客户姓名</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="cnName" value="${customerInfoForm.cnName}" /><form:errors path="cnName" cssClass="bind-error"/>
            </td>
			<td width="85" class="tdright">*英文姓名</td>
            <td width="150px" style="color:#2E74D1;" ><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="enName" value="${customerInfoForm.enName}"/><form:errors path="enName" cssClass="bind-error"/>
            </td>
			<td width="85"class="tdright">*出生日期</td>
            <td width="250px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled" name="birtyday" value="<fmt:formatDate value="${customerInfoForm.birtyday}"/>"/><form:errors path="birtyday" cssClass="bind-error"/>
            </td>
          </tr>
		    <tr>
            <td width="85"class="tdright">*国籍</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="nationality" value="${customerInfoForm.nationality}"/><form:errors path="nationality" cssClass="bind-error"/></td>
            <td width="85" class="tdright">*性别</td>
            <td width="150px" style="color:#2E74D1;"><form:radiobutton path="gender" value="0" disabled="true"/>男<form:radiobutton path="gender" value="1" disabled="true"/>女<form:errors path="gender" cssClass="bind-error"/>
            </td>
			<td width="85" class="tdright">证件类型</td>
            <td width="150px" style="color:#2E74D1;"><form:select class="u83" id="cardType"  path="cardType" disabled="true">
															<form:option  value="01">身份证</form:option>
															<form:option  value="02">护照</form:option>
															<form:option  value="03">港澳台通行证</form:option>
															<form:option  value="04">军人证</form:option>
															<form:option  value="99">其他</form:option>
														</form:select>

            </td>
			<td width="85"class="tdright">*证件号码</td>
            <td width="250px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_180" disabled="disabled"  id="cardId" name="cardId" value="${customerInfoForm.cardId}"/><form:errors path="cardId" cssClass="bind-error"/>
            </td>
          </tr>
		    <tr>
            <td width="85"class="tdright">*签发日期</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled" name="signDate" value="<fmt:formatDate value="${customerInfoForm.signDate}"/>"/><form:errors path="signDate" cssClass="bind-error"/></td>
            <td width="85" class="tdright">*失效日期</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled" name="invalidDate" value="<fmt:formatDate value="${customerInfoForm.invalidDate}"/>"/><form:errors path="invalidDate" cssClass="bind-error"/>
            </td>
			<td width="85" class="tdright">*发证机关所在地</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_180" disabled="disabled" name="native_" value="${customerInfoForm.native_}"/><form:errors path="native_" cssClass="bind-error"/>

            </td>
			<td width="85"class="tdright">使用语言</td>
            <td width="250px" style="color:#2E74D1;">
            										<SELECT id=u83 class="u83" name="language" disabled="disabled">
														<dictionary:options type="0001" selectedValue="${customerInfoForm.language}"/>
													</SELECT>
            </td>
          </tr>
		  <tr>
            <td width="85"class="tdright">*母亲姓名</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="motherName" value="${customerInfoForm.motherName}"/><form:errors path="motherName" cssClass="bind-error"/></td>
            <td width="85" class="tdright">婚姻状况</td>
            <td width="150px" style="color:#2E74D1;"><SELECT id=u83 class="u83" name="maritalStatus" disabled="disabled">
														<dictionary:options type="0002" selectedValue="${customerInfoForm.maritalStatus}"/>
														</SELECT>
            </td>
			<td width="85" class="tdright">学历</td>
            <td width="150px" style="color:#2E74D1;">
           											  <form:select class="u83" id="degree"  path="degree" disabled="true">
															<form:option  value="01">文盲</form:option>
															<form:option  value="02">小学</form:option>
															<form:option  value="03">初中</form:option>
															<form:option  value="04">高中</form:option>
															<form:option  value="05">本科</form:option>
															<form:option  value="06">硕士</form:option>
															<form:option  value="07">博士</form:option>
														</form:select>

            </td>
			<td width="85"class="tdright">职业</td>
            <td width="250px" style="color:#2E74D1;"><SELECT id=u83 class="u83" name="job" disabled="disabled">
														<dictionary:options type="0004" selectedValue="${customerInfoForm.job}"/>
														</SELECT>
            </td>
          </tr>
		   <tr>
            <td width="85"class="tdright">单位名称</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="organization" value="${customerInfoForm.organization}"/><form:errors path="organization" cssClass="bind-error"/></td>
            <td width="85" class="tdright">行业</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="industry" value="${customerInfoForm.industry}" />
            </td>
			<td width="85" class="tdright">工作年限</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="workLimit" value="${customerInfoForm.workLimit}"/>

            </td>
			<td width="85"class="tdright">职务</td>
            <td width="250px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="position" value="${customerInfoForm.position}"/>
            </td>
          </tr>
		   <tr>
            <td width="85"class="tdright">单位规模</td>
            <td width="150px" style="color:#2E74D1;"><SELECT id=u83 class="u83" name="enterpriseScale" disabled="disabled">
														<dictionary:options type="0005" selectedValue="${customerInfoForm.enterpriseScale}"/>
														</SELECT></td>
            <td width="85" class="tdright">*电子邮箱</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="email" value="${customerInfoForm.email}"/><form:errors path="email" cssClass="bind-error"/>
            </td>
			<td width="85" class="tdright">*移动电话</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="mobile" value="${customerInfoForm.mobile}"/><form:errors path="mobile" cssClass="bind-error"/>

            </td>
			<td width="85"class="tdright">固定电话</td>
            <td width="250px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="areaTel" value="${customerInfoForm.areaTel}"/>-<input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="tel" value="${customerInfoForm.tel}"/><form:errors path="tel" cssClass="bind-error"/>
            </td>
          </tr>
		   <tr>
            <td width="85"class="tdright">*通讯地址</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_180" disabled="disabled" name="adress" value="${customerInfoForm.adress}"/><form:errors path="adress" cssClass="bind-error"/></td>
            <td width="85" class="tdright">*邮编</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="postCode" value="${customerInfoForm.postCode}"/><form:errors path="postCode" cssClass="bind-error"/>
            </td>
			<td width="85" class="tdright"> </td>
            <td width="150px" style="color:#2E74D1;"> 

            </td>
			<td width="85"class="tdright"> </td>
            <td width="250px" style="color:#2E74D1;"> 
            </td>
          </tr>
		<tr><th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;紧急联系人：</th></tr>
		<input type="hidden"  name="contact.id" value="${customerInfoForm.contact.id}"/>
		<tr><th   height="1" colspan="8" style="border-top:#999999 solid 1px;">&nbsp;</th></tr>
          <tr>
		  <td width="85" class="tdright">*客户姓名</td>
            <td width="150px" style="color:#2E74D1;" ><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="contact.cnName" value="${customerInfoForm.contact.cnName}"/><form:errors path="contact.cnName" cssClass="bind-error"/></td>
            <td width="85"  class="tdright">英文姓名</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="contact.enName" value="${customerInfoForm.contact.enName}"/><form:errors path="contact.enName" cssClass="bind-error"/>
            </td>
			<td width="85" class="tdright">出生日期</td>
            <td width="150px" style="color:#2E74D1;" ><input type="text" class="ggkj_inputtext_80"  disabled="disabled" name="contact.birtyday" value="<fmt:formatDate value="${customerInfoForm.contact.birtyday}"/>" /><form:errors path="contact.birtyday" cssClass="bind-error"/>
            </td>
			<td width="85"class="tdright">*性别</td>
            <td width="250px" style="color:#2E74D1;"><form:radiobutton path="contact.gender" value="0" disabled="true"/>男<form:radiobutton path="contact.gender" value="1" disabled="true"/>女<form:errors path="contact.gender" cssClass="bind-error"/>
            </td>
          </tr>
		    <tr>
            <td width="85"class="tdright">移动电话</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="contact.mobile" value="${customerInfoForm.contact.mobile}"/><form:errors path="contact.mobile" cssClass="bind-error"/></td>
            <td width="85" class="tdright">*固定电话</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="contact.areaTel" value="${customerInfoForm.contact.areaTel}"/>-<input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="contact.tel" value="${customerInfoForm.contact.tel}"/><form:errors path="contact.tel" cssClass="bind-error"/>
            </td>
             
			<td width="85" class="tdright">关系</td>
            <td width="150px" style="color:#2E74D1;">
				<SELECT id=u83 class="u83" name="contact.relation" disabled="disabled">
					<dictionary:options type="0007" selectedValue="${customerInfoForm.contact.relation}"/>
				</SELECT>
            </td>
			<td width="85"class="tdright">电子邮箱</td>
            <td width="250px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="contact.email" value="${customerInfoForm.contact.email}"/><form:errors path="contact.email" cssClass="bind-error"/>
            </td>
          </tr>
		    <tr>
             
			<td width="85" class="tdright">*通讯地址</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_180" disabled="disabled" name="contact.adress" value="${customerInfoForm.contact.adress}"/><form:errors path="contact.adress" cssClass="bind-error"/>

            </td>
			<td width="85"class="tdright">邮编</td>
            <td width="250px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_80" disabled="disabled"  name="contact.postCode" value="${customerInfoForm.contact.postCode}"/><form:errors path="contact.postCode" cssClass="bind-error"/>
            </td>
            <td width="85" class="tdright">*证件类型</td>
            <td width="150px" style="color:#2E74D1;"><form:select class="u83" id="contact.cardType"  path="cardType" disabled="true">
															<form:option  value="01">身份证</form:option>
															<form:option  value="02">护照</form:option>
															<form:option  value="03">港澳台通行证</form:option>
															<form:option  value="04">军人证</form:option>
															<form:option  value="05">户口簿</form:option>
															<form:option  value="99">其他</form:option>
														</form:select>
            </td>
			<td width="85"class="tdright">*证件号码</td>
            <td width="250px" style="color:#2E74D1;"><input type="text" class="ggkj_inputtext_180" id="contact.cardId" name="contact.cardId" value="${customerInfoForm.contact.cardId}" maxLength="18" disabled="disabled"/><form:errors path="contact.cardId" cssClass="bind-error"/>
            </td>
          </tr>
		<tr><th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;其他资料信息：</th></tr>
		<tr><th  height="1" colspan="8" style="border-top:#999999 solid 1px;">&nbsp;</th></tr>
          <tr>
            <td width="85" class="tdright">*客户经理</td>
            <td width="150px" style="color:#2E74D1;"><input type="hidden" class="ggkj_inputtext_80" id="customerManager" name="customerManager" value="${customerInfoForm.customerManager}"/><input type="text" class="ggkj_inputtext_80" disabled="disabled"  id="customerManagerDisplay" name="customerManagerDisplay" disabled="disabled"/>
            <form:errors path="customerManager" cssClass="bind-error"/>
            </td>
			<td width="85" class="tdright">*理财顾问</td>
            <td width="150px" style="color:#2E74D1;"><input type="hidden" class="ggkj_inputtext_80" id="consultant" name="consultant" value="${customerInfoForm.consultant}"/><input type="text" class="ggkj_inputtext_80" id="consultantDisplay" name="consultantDisplay" disabled="disabled"/>
            <form:errors path="consultant" cssClass="bind-error"/>
            </td>
			<td width="85"  class="tdright">文件接收方式</td>
            <td width="250px" style="color:#2E74D1;">
            	<SELECT id=u83 class="u83" name="receiveType" disabled="disabled">
					<dictionary:options type="0006" selectedValue="${customerInfoForm.receiveType}"/>
				</SELECT>
            </td>
            
            <td width="85" class="tdright">部门主管</td>
            <td width="150px" style="color:#2E74D1;"><input type="hidden" class="ggkj_inputtext_80" id="departmentManager" name="departmentManager" value="${customerInfoForm.departmentManager}" disabled="disabled"/><input type="text" class="ggkj_inputtext_80" id="departmentManagerDisplay" name="departmentManagerDisplay" disabled="disabled"/>
            	<form:errors path="departmentManager" cssClass="bind-error"/>
            </td>
          </tr>
		    
      </table>
    </div>
	<div class="yiban" style="text-align:left;">
  <input name="" type="" class="quxiao_big" value="&nbsp;&nbsp;取消" onclick="window.location=('${ctx}/crm/list?p=history');"/>
</form:form>
</div>
<c:if test="${not empty error}">
<div style="color:red">
		${error}
	</c:if>
</div>
</body>
</html>